package com.abc.springcloud.service.impl;

import com.abc.springcloud.dao.PaymentDao;
import com.abc.springcloud.entities.Payment;
import com.abc.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @Describe
 * @Author wangzhe
 * @Date 2020/9/23 16:39
 */
@Repository
@SuppressWarnings("all")
public class PaymentServiceImpl implements PaymentService {

    @Autowired
    private PaymentDao paymentDao;

    @Override
    public int create(Payment payment) {
        return paymentDao.insert(payment);
    }

    @Override
    public int deleteById(Long id) {
        return paymentDao.deleteById(id);
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.queryById(id);
    }

}
